﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        if (!!keyValue) {
            $.ajax({
                url: "/BusinessManage/D_Indent/GetMemberIndentFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                    gridList(data);
                }
            });
        }

    });
        function gridList(data) {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            url: "/BusinessManage/D_Goods/GetGrid",
            postData: { keyword: data.D_G_F_ID },
            height: $(window).height() - 340,
            colModel: [
                { label: "主键", name: "F_Id", hidden: true, key: true },
                { label: '商品图片',name: 'F_Pic', index: 'F_Pic', width: 200, align: "center", sortable: false, editable: false, formatter: alarmFormatter },
                { label: '商品名称', name: 'F_Name', width: 200, align: 'left' },
                { label: '商品价格', name: 'F_Price', width: 200, align: 'left' },
                { label: '商品规格', name: 'F_Spec', width: 200, align: 'left' },
                { label: '商品描述', name: 'F_Summary', width: 300, align: 'left' }
            ],
            pager: "#gridPager",
            sortname: 'F_CreatorTime desc',
            viewrecords: true
        });
    }
    function alarmFormatter(cellvalue, options, rowdata)
    {
        return '<img class="alarmimg" style="max-height:42px;max-width:42px;" src="/'+cellvalue+'" />';
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/BusinessManage/D_Indent/CheckForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#">订单信息</a></li>
        </ul>
        <div style="padding-top: 20px; margin-right: 30px;">
            <table class="form">
                <tr>
                    <th class="formTitle">收货人</th>
                    <td class="formValue">
                        <input id="F_MemName" name="F_MemName" type="text" class="form-control required" placeholder="请输入账户" />
                    </td>
                    <th class="formTitle">收货人账号</th>
                    <td class="formValue">
                        <input id="F_MemAccount" name="F_MemAccount" type="text" class="form-control required" placeholder="请输入账户" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">收货人电话</th>
                    <td class="formValue">
                        <input id="F_MemTel" name="F_MemTel" type="text" class="form-control required" placeholder="请输入账户" />
                    </td>
                    <th class="formTitle">收货地址</th>
                    <td class="formValue">
                        <input id="F_OrderAddress" name="F_OrderAddress" type="text" class="form-control required" placeholder="请输入账户" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">快递公司</th>
                    <td class="formValue">
                        <input id="F_Company" name="F_Company" type="text" class="form-control" />
                    </td>
                    <th class="formTitle">快递单号</th>
                    <td class="formValue">
                        <input id="F_FastNo" name="F_FastNo" type="text" class="form-control" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">订单时间</th>
                    <td class="formValue">
                        <input id="F_OrderDate" name="F_OrderDate" type="text" class="form-control required" placeholder="请输入账户" />
                    </td>
                    @*<th class="formTitle">订单状态</th>
                    <td class="formValue">
                        <select id="F_EnabledMark" name="F_EnabledMark" class="form-control">
                            <option value="true">已发货</option>
                            <option value="false">未发货</option>
                        </select>
                    </td>*@
                </tr>
            </table>
        </div>
        <div class="gridPanel">
            <table id="gridList"></table>
            <div id="gridPager"></div>
        </div>
    </div>

</form>
